package hibernate_advanced_apply.object_inherit_mapping.two_table.annotation.source;

import javax.persistence.*;

/**
 * @author Administrator
 * @create 2019-01-11 13:53
 * @desc 领导持久化类
 **/
@Entity//子类
@Table(name="leader")
@AttributeOverrides({//可以不写
        @AttributeOverride(name="id",column=@Column(name="id")),
        @AttributeOverride(name="name",column=@Column(name="name"))}
)
public class Leader extends Company {

    private String work;

    public String getWork() {
        return work;
    }

    public void setWork(String work) {
        this.work = work;
    }
}
